﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ProcelNasEscolas.Model.Fichas;
using ProcelNasEscolas.Model.Interfaces;
using ProcelNasEscolas.Model.Respostas;
using ProcelNasEscolas.Model;

namespace ProcelNasEscolas.Data
{
    public class RespostaConsumoDao : AbstractCrudDao<RespostaConsumoData>, IRespostaConsumoDao 
    {
        public RespostaConsumo ToModelObject(RespostaConsumoData respostaConsumoData)
        {
            RespostaConsumo respostaConsumoModel = new RespostaConsumo();
            respostaConsumoModel.Id = respostaConsumoData.Id;
            respostaConsumoModel.kWh = respostaConsumoData.KWh;
            respostaConsumoModel.MesAno = respostaConsumoData.MesAno;

            return respostaConsumoModel;
        }

        public RespostaConsumoData CreateDataObject(RespostaConsumo respostaModel)
        {
            RespostaConsumoData respostaData = new RespostaConsumoData()
            {
                KWh = respostaModel.kWh,
                MesAno = respostaModel.MesAno
            };
            return respostaData;
        }
    }
}
